<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            position: relative;
            width: 160px;
            margin: 100px auto;
            background-color: #ccc;
        }
        .box img{
            width: 160px;
            height: 90px;
        }
        .box .close_btn{
            position: absolute;
            top: 0;
            left: -16px;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <div class="box">
        女孩
        <img src="./images/girl.jpg" alt="">
        <i class="close_btn">×</i>
    </div>
    <script>
        var box = document.querySelector('.box');
        var close_btn = document.querySelector('.close_btn');
        close_btn.onclick = function(){
            box.style.display = 'none';
        }
    </script>
</body>
</html>